//修改
var arrMove = [];
var _this = null;
$(document).on("click", ".compiler", function() {
    arrMove = []
    _this = $(this).parents("tr")
    $(".movefade").fadeIn(600)
    $(this).parent().siblings().each(function() {
        arrMove.push($(this).text())

    })
    $(this).parents().find('.movemodal input').each(function(i) {
        $(this).val(arrMove[i])
    })
})

//修改确定
$(document).on("click", ".addbtn_ok", function() {
    arrMove = []
    $(this).parent().siblings().find('input').each(function() {
        arrMove.push($(this).val())
        console.log($(this))
    })
    console.log(arrMove)
    $(this).parents().find('.movemodal input').each(function(i) {
        $(this).val(arrMove[i])

    })

    _this.find("td").each(function(i) {
        $(this).text(arrMove[i])
    })

    $(".movefade").fadeOut(500);
    var id=$("#employeeTable tr").find("td:eq(0)").text();
    var con=$("#employeeTable tr").find("td:eq(1)").text();
    var VIP1=$("#employeeTable tr").find("td:eq(2)").text();
    var VIP3=$("#employeeTable tr").find("td:eq(3)").text();
    var VIP6=$("#employeeTable tr").find("td:eq(4)").text();
    var year=$("#employeeTable tr").find("td:eq(5)").text();
    $.ajax({
        url:"/admin/Exchange/update",
        type:"post",
        data:{
            eId:id,
            eConvert:con,
            eVipPrice1:VIP1,
            eVipPrice3:VIP3,
            eVipPrice6:VIP6,
            eVipPrice12:year,
        },
        dataType:"json",
        success:function () {
            
        },
        error:function () {

        }
    })
})
//修改取消
$(document).on("click", ".addbtn_no", function() {
    $(".movefade").fadeOut(500)
})

$(document).on("click", ".modal-header i", function() {
    $(".movefade").fadeOut(500)
})
